home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1997
/
MacHack 1997.toast
/
Hacks
/
Hacks ’97
/
Klingon BG App
/
Source
/
SoundUtils.h
< prev
next >
Wrap
Text File
|
1997-06-28
|
1KB
|
58 lines
// Source code for Klingon Clock. Copyright (C) 1996-1997
// Charles H. Hemstreet IV
//
// Started at MacHack 1996
// Completed at MacHack 1997
//
// Best thanks to:
// My wife Regie, son Chad and baby
// Other thanks to Elden Wood and Bob Clark
//
// This code is distributed "as-is" and implies no warranty or guarantee.
#ifndef __SOUNDUTILS__
#define __SOUNDUTILS
#ifndef __SOUND__
#include <Sound.h>
#endif
#ifndef __ASSERT__
#include <assert.h>
#endif
// Constants
#define kSoundDone 913
#define kNumberSounds 13 // this is also defined in main.h!!!
#define kFirstSoundID 1000
#define kOneSecond 60
#define kWaitSeconds (1 * kOneSecond)
// prototypes
OSErr openSndChannel(void);
OSErr closeSndChannel(void);
OSErr LoadBufferSounds (void);
Boolean SndChanDone(SndChannelPtr chan);
void doPlayASound (short soundID, short priority);
OSErr playASound (short soundID, short priority);
pascal void ExternalCallBack (SndChannelPtr, SndCommand);
void waitCloseChannel(void);
// GLOBALS
SndCallBackUPP externalCallBackUPP;
short externalPriority;
// globals declared elsewhere
extern Ptr gTheSoundData[kNumberSounds];
extern SndChannelPtr gSndChannel;
extern Boolean gChannelOpen;
#endif //__SOUNDUTILS__